Internal Linkage and External Linkage in C
It is often quite hard to distinguish between scope and linkage, and the roles they play. This article focuses on scope and linkage, and how they are used in C language. Note: All C programs have been compiled on 64 bit GCC 4.9.2. Also, the terms “identifier” and “name” have been used interchangeably in this article....
read more
C program to Check Whether a Number is Positive or Negative or Zero
Given a number A. The task is to check whether A is positive, negative or zero. Examples:...
read more
getchar Function in C
C getchar is a standard library function that takes a single input character from standard input. The major difference between getchar and getc is that getc can take input from any no of input streams but getchar can take input from a single standard input stream....
read more
Advantages and Disadvantages of Array in C
An array is a data structure that stores a collection of elements, all of the same data type, in a contiguous block of memory. Each element in the array is identified by an index, which is a numerical value that represents the position of the element in the array. The first element in the array has an index of 0, the second element has an index of 1, and so on....
read more
Difference between sizeof(int *) and sizeof(int) in C/C++
sizeof()...
read more
Bubble Sort for Linked List by Swapping nodes
Given a singly linked list, sort it using bubble sort by swapping nodes....
read more
Program to check if two strings are same or not
Given two strings, the task is to check if these two strings are identical(same) or not....
read more
What Happen When We Exceed Valid Range of Built-in Data Types in C++?
In this article, we will look at what happened when we exceed the valid range of built-in data types in C++ with some examples....
read more
Program to print hollow pyramid, diamond pattern and their modifications
For Prerequisite : Loops, If Else Statement1. Hollow pyramid/triangle pattern The pattern is similar to pyramid pattern. The only difference is, we will replace all internal ‘#’ or ‘*’ characters by space character and we will print 2*N-1 (N = number of rows in pattern) ‘#’ or ‘*’ characters in last row. Examples:...
read more
restrict keyword in C
In the C programming language (after the C99 standard), a new keyword is introduced known as restrict....
read more
Properties of Array in C
An array in C is a fixed-size homogeneous collection of elements stored at a contiguous memory location. It is a derived data type in C that can store elements of different data types such as int, char, struct, etc. It is one of the most popular data types widely used by programmers to solve different problems not only in C but also in other languages....
read more
Does overloading work with Inheritance?
If we have a function in base class and another function with the same name in derived class, can the base class function be called from derived class object? This is an interesting question and as an experiment, predict the output of the following C++ program:...
read more